package com.atguigu.crowd.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@Configuration
public class WebMvcConfig implements WebMvcConfigurer {

    @Override
    public void addViewControllers(ViewControllerRegistry registry) {

        //请求地址
        String pathUrl="/auth/to/member-reg.html";

        //页面名称
        String viewName="member-reg";

        registry.addViewController(pathUrl).setViewName(viewName);
        registry.addViewController("/auth/to/member/login/page").setViewName("member-login");
        registry.addViewController("/auth/to/member/center/page").setViewName("member-center");
        registry.addViewController("/member/my/crowd").setViewName("member-crowd");
    }
}
